<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="laundryRequestReception.title"/></title>
    <meta name="heading" content="<fmt:message key='laundryRequestReception.heading'/>"/>
    <meta name="menu" content="RoleAdminLaundry"/>   
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpLaundryRequestForm.html?decorate=false'/>"
           title="Help laundry request form"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
            <fmt:message key="help"/>
        </a>
    </h2>
</div>
<table class="tableGrey" id="SelectedDatas">
    <thead>
        <tr>
            <th class="hidden"/>
            <th><fmt:message key="laundry"/></th>
            <th><fmt:message key="tradeMark.name" /> </th>
            <th><fmt:message key="pantDesign" /> </th>
            <th><fmt:message key="laundryType.type" /> </th>
            <th><fmt:message key="sizeRank.name"/></th>
            <th class="hidden"/>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td> <s:property value="laundryRequest.laundry.name" /> </td>
            <td> <s:property value="laundryRequest.tradeMark.name" /> </td>
            <td> <s:property value="pantDesign.datasModelAndMaterial" /> </td>
            <td> <s:property value="laundryRequestItem.laundryType.type" /> </td>
            <td> <s:property value="laundryRequest.sizeRank.name" /> </td>
        </tr>
    </tbody>
</table>
<s:form id="laundryRequestReceptionForm" name="laundryRequestReceptionForm" action="saveLaundryRequestReception" method="post" validate="true">
    <s:hidden key="laundryRequestItem.id" cssClass="text medium"/>

    <s:textfield key="laundryRequestItem.failUnitPrice" required="true" cssClass="text medium"/>
    <table class="table">
        <thead>
            <tr>
                <s:iterator value="modelSizes">
                    <th><s:property value="valueSize" /></th>
                </s:iterator>
            </tr>
        </thead>
        <tbody>
            <tr>
                <s:iterator value="quantities" id="quantitiesL" status="status">
                    <td><s:textfield name="quantities" value="%{quantities[#status.index]}"  size="6">
                    </s:textfield></td>
                </s:iterator>
            </tr>
        </tbody>
    </table>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty laundryRequestItem.id}">
            <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('loundryRequest')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel"  theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("laundryRequestReceptionForm"));
</script>